package cn.iocoder.yudao.position.mapper;

import cn.iocoder.yudao.framework.common.pojo.PageResult;
import cn.iocoder.yudao.framework.mybatis.core.mapper.BaseMapperX;
import cn.iocoder.yudao.framework.mybatis.core.query.LambdaQueryWrapperX;
import cn.iocoder.yudao.position.entity.PositionDO;
import cn.iocoder.yudao.position.vo.PositionPageReqVO;
import org.apache.ibatis.annotations.Mapper;


/**
 * 职位-信息 Mapper
 *
 * @author 超级管理员
 */
@Mapper
public interface PositionMapper extends BaseMapperX<PositionDO> {

    default PageResult<PositionDO> selectPage(PositionPageReqVO reqVO) {
        return selectPage(reqVO, new LambdaQueryWrapperX<PositionDO>().eqIfPresent(PositionDO::getTenantId, reqVO.getTenantId()).eqIfPresent(PositionDO::getTitle, reqVO.getTitle()).eqIfPresent(PositionDO::getJobCode, reqVO.getJobCode()).eqIfPresent(PositionDO::getEducationDictCode, reqVO.getEducationDictCode()).eqIfPresent(PositionDO::getEducationDictLabel, reqVO.getEducationDictLabel()).eqIfPresent(PositionDO::getSalaryDictCode, reqVO.getSalaryDictCode()).eqIfPresent(PositionDO::getSalaryDictLabel, reqVO.getSalaryDictLabel()).eqIfPresent(PositionDO::getGenderDictCode, reqVO.getGenderDictCode()).eqIfPresent(PositionDO::getGenderDictLabel, reqVO.getGenderDictLabel()).eqIfPresent(PositionDO::getExperienceDictCode, reqVO.getExperienceDictCode()).eqIfPresent(PositionDO::getExperienceDictLabel, reqVO.getExperienceDictLabel()).eqIfPresent(PositionDO::getCompanyTypeDictCode, reqVO.getCompanyTypeDictCode()).eqIfPresent(PositionDO::getCompanyTypeDictLabel, reqVO.getCompanyTypeDictLabel()).eqIfPresent(PositionDO::getCompanySizeDictCode, reqVO.getCompanySizeDictCode()).eqIfPresent(PositionDO::getCompanySizeDictLabel, reqVO.getCompanySizeDictLabel()).eqIfPresent(PositionDO::getBenefitsDictCode, reqVO.getBenefitsDictCode()).eqIfPresent(PositionDO::getBenefitsDictLabel, reqVO.getBenefitsDictLabel()).eqIfPresent(PositionDO::getAgeDictCode, reqVO.getAgeDictCode()).eqIfPresent(PositionDO::getAgeDictLabel, reqVO.getAgeDictLabel()).eqIfPresent(PositionDO::getOnboardDictCode, reqVO.getOnboardDictCode()).eqIfPresent(PositionDO::getOnboardDictLabel, reqVO.getOnboardDictLabel()).eqIfPresent(PositionDO::getMaritalDictCode, reqVO.getMaritalDictCode()).eqIfPresent(PositionDO::getMaritalDictLabel, reqVO.getMaritalDictLabel()).eqIfPresent(PositionDO::getLanguageDictCode, reqVO.getLanguageDictCode()).eqIfPresent(PositionDO::getLanguageDictLabel, reqVO.getLanguageDictLabel()).eqIfPresent(PositionDO::getFreshGraduateDictCode, reqVO.getFreshGraduateDictCode()).eqIfPresent(PositionDO::getFreshGraduateDictLabel, reqVO.getFreshGraduateDictLabel()).eqIfPresent(PositionDO::getRecruitNumber, reqVO.getRecruitNumber()).betweenIfPresent(PositionDO::getValidDate, reqVO.getValidDate()).eqIfPresent(PositionDO::getIsLatest, reqVO.getIsLatest()).eqIfPresent(PositionDO::getIsUrgent, reqVO.getIsUrgent()).eqIfPresent(PositionDO::getIsRecommend, reqVO.getIsRecommend()).eqIfPresent(PositionDO::getIsHot, reqVO.getIsHot()).eqIfPresent(PositionDO::getViewCount, reqVO.getViewCount()).eqIfPresent(PositionDO::getCommunicationCount, reqVO.getCommunicationCount()).eqIfPresent(PositionDO::getCommunicationRate, reqVO.getCommunicationRate()).eqIfPresent(PositionDO::getDeliveryCount, reqVO.getDeliveryCount()).eqIfPresent(PositionDO::getFavoriteCount, reqVO.getFavoriteCount()).eqIfPresent(PositionDO::getJobDescription, reqVO.getJobDescription()).eqIfPresent(PositionDO::getJobRequirement, reqVO.getJobRequirement()).eqIfPresent(PositionDO::getJobKeywords, reqVO.getJobKeywords()).likeIfPresent(PositionDO::getContactName, reqVO.getContactName()).eqIfPresent(PositionDO::getContactPosition, reqVO.getContactPosition()).eqIfPresent(PositionDO::getContactPhone, reqVO.getContactPhone()).eqIfPresent(PositionDO::getContactEmail, reqVO.getContactEmail()).eqIfPresent(PositionDO::getWorkProvinceCode, reqVO.getWorkProvinceCode()).likeIfPresent(PositionDO::getWorkProvinceName, reqVO.getWorkProvinceName()).eqIfPresent(PositionDO::getWorkCityCode, reqVO.getWorkCityCode()).likeIfPresent(PositionDO::getWorkCityName, reqVO.getWorkCityName()).eqIfPresent(PositionDO::getWorkDistrictCode, reqVO.getWorkDistrictCode()).likeIfPresent(PositionDO::getWorkDistrictName, reqVO.getWorkDistrictName()).eqIfPresent(PositionDO::getWorkAddress, reqVO.getWorkAddress()).eqIfPresent(PositionDO::getLongitude, reqVO.getLongitude()).eqIfPresent(PositionDO::getLatitude, reqVO.getLatitude()).eqIfPresent(PositionDO::getStatus, reqVO.getStatus()).betweenIfPresent(PositionDO::getCreateTime, reqVO.getCreateTime()).eqIfPresent(PositionDO::getRemark, reqVO.getRemark()).orderByDesc(PositionDO::getId));
    }

}